﻿#Region "IMPORTS"
Imports DAO

#End Region

Public Class FuncionarioService
    Inherits Service(Of Funcionario)

#Region "CONSTRUTOR(S)"

    Public Sub New()
        MyBase.New()
    End Sub

#End Region

    Private ReadOnly Property Dao() As FuncionarioDao
        Get
            If (Me._dao Is Nothing) Then
                Me._dao = New FuncionarioDao()
            End If
            Return Me._dao
        End Get
    End Property

#Region "METODOS ABSTRATOS"

    Public Overrides Function Insert(ByVal modelo As Funcionario) As Funcionario
        Return Dao.Insert(modelo)
    End Function

    Public Overrides Sub Delete(ByVal modelo As Funcionario)
        Dao.Delete(modelo)
    End Sub

    Public Overrides Function Find(ByVal NHQL As String) As IList(Of Funcionario)
        Return Dao.Find(NHQL)
    End Function
    
    Public Overrides Function GetAll() As IList(Of Funcionario)
        Return Dao.GetAll()
    End Function

    Public Overrides Function GetById(ByVal id As Integer) As Funcionario
        Return Dao.GetById(id)
    End Function

    Public Overrides Sub Update(ByVal modelo As Funcionario)
        Dao.Update(modelo)
    End Sub

    Public Overrides Function Search(ByVal condicoes As IList(Of Condicao)) As IList(Of Funcionario)
        Return Dao.Search(condicoes)
    End Function

#End Region

End Class
